@x-oasis/recycler
Installation
$ npm i @x-oasis/recycler
How to use
import IntegerBufferSet from '@x-oasis/recycler'
How to run test
$ pnpm test
Philosophy
Basically, give an List index then get a placed position(recycler list index); In order to reuse more elements, object ref should be considered..
For Example, remove / delete / add an element, they all cause index change of original source data. but
API
updateIndices
updateIndices(props: {
safeRange: {
startIndex: number;
endIndex: number;
};
startIndex: number;
maxCount: number;
step?: number;
onProcess?: (type?: string, index?: number) => boolean
})